<?php

namespace app\model;

use think\Model;

class TrademarkdynamicPraiseModel extends Model
{

    protected $connection         = 'mysql';
    protected $pk                 = 'id';
    protected $name               = 'trademark_dynamic_praise';
    protected $autoWriteTimestamp = 'int';
    protected $append             = ['create_time_text'];
    protected $createTime         = 'create_time';

    public function getCreateTimeTextAttr($value, $data)
    {
        if (isset($data['create_time'])) {
            $value = date('Y-m-d H:i:s', $data['create_time']);
        }
        return $value;
    }
}
